package com.decent.ejfadmin.product.service;

import com.decent.ejfadmin.common.bean.*;
import com.decent.ejfadmin.common.exception.SupException;
import com.decent.ejfadmin.product.request.*;

import java.util.List;

/**
 * @author zhangchao
 * @date 2018/7/25 9:08
 */
public interface ProductService {

    /**
     * 查询产品列表
     *
     * @param param
     * @return
     */
    Page findProductListPage(ProductQueryParam param);

    /**
     * 修改产品上下架
     *
     * @param productIds
     * @param status
     * @param remark
     * @throws SupException
     */
    void changeProductStatus(String productIds, Integer status, String remark) throws SupException;

    /**
     * 获取会员模板密价
     *
     * @param param
     * @return
     */
    Page findModelPricePage(ModelPriceParam param);

    /**
     * 添加密价模板
     *
     * @param supplyModel
     * @throws SupException
     */
    void addPriceModel(SupplyModel supplyModel) throws SupException;

    /**
     * 修改密价模板
     *
     * @param supplyModel
     * @throws SupException
     */
    void modifyPriceModel(SupplyModel supplyModel) throws SupException;

    /**
     * 获取会员密价
     *
     * @param param
     * @return
     */
    Page findUserPricePage(UserPriceParam param);

    /**
     * 设置会员密价
     *
     * @param param
     * @throws SupException
     */
    void setUpUserPrice(SetUpUserPriceParam param) throws SupException;

    /**
     * 设置会员模板密价
     *
     * @param param
     * @throws SupException
     */
    void setUpModelPrice(SetUpModelPriceParam param) throws SupException;

    /**
     * 设置会员推荐返利折扣
     *
     * @param param
     * @throws SupException
     */
    void setUpRebateDiscount(SetUpRebateDiscountParam param) throws SupException;

    /**
     * 获取所有会员模板密价
     *
     * @param param 是否查询超快销和慢销
     * @return
     */
    List findModelPrice(boolean param);


    /**
     * 快速修改产品状态
     *
     * @param param
     * @throws SupException
     */
    void setProductStatus(SetUpModelPriceParam param) throws SupException;

    /**
     * 查询所有会员
     *
     * @param userAccount 会员编号
     * @return
     */
    List<SupUser> queryUserByAccount(String userAccount);

    /**
     * 新增产品
     *
     * @param product
     * @return
     * @throws Exception
     */
    MessageBean addProduct(SupplyProduct product) throws Exception;

    /**
     * 修改产品
     *
     * @param product
     * @return
     * @throws Exception
     */
    MessageBean editProduct(SupplyProduct product) throws Exception;

    /**
     * 编辑产品校验规则
     *
     * @param productIds   产品id
     * @param cardRestrict 校验规则
     * @return
     */
    MessageBean updateCardRestrict(String productIds, String cardRestrict) throws Exception;

    /**
     * 删除产品
     *
     * @param productIds 产品id
     * @return
     */
    MessageBean deleteProduct(String productIds);

    /**
     * 密价克隆
     *
     * @param sourceUserAccount
     * @param targetUserAccount
     * @param productType
     * @return
     */
    MessageBean cloneUserPrice(String sourceUserAccount, String targetUserAccount, Integer productType);

    /**
     * 设置会员密价
     *
     * @param ids
     * @param status
     * @return
     */
    MessageBean setCecretPriceStatus(Long[] ids, Integer status) throws Exception;
}
